package com.saozhu.command;

import com.saozhu.pojo.Player;

public abstract class AbstractCommandFactory {

	public static enum CommandCode {
		ADDGOODS,ALTERGOODS,DELETEGOODS,DELETEORDER,EXIT,HELP,SHOWHELP,LOGIN,SIGNUP,SHOW
	}

	public static AbstractCommandFactory getCommandFactory(Player player) {
		if (player == null) {
			return new SystemCommandFactory();
		}
		return new ManagerCommandFactory(player);
	}

	public abstract Command buildCommand(CommandCode commandcode);
}
